package com.example;

import com.example.service.AsyncTaskService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
/**
 * Copyright © 2016年 author. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * @Date 2017/9/6 0006 15:11
 */
@SpringBootApplication
public class WebApplication {

	public static void main(String[] args) {
		SpringApplication.run(WebApplication.class, args);

		System.out.println("hello spring boot!");

//		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskExecutorConfig.class);
//
//		AsyncTaskService asyncTaskService = context.getBean(AsyncTaskService.class);
//
//		for (int i = 0; i < 10; i++) {
//			asyncTaskService.exectureAsuncTask(i);
//			asyncTaskService.exectureAsyncTaskPlus(i);
//		}
//
//		context.close();
	}
}
